function compileRange(self)
{
    self.Range = Class.create(
    {
        /**
         * Constructor.
         * 
         * @param topLeft coords.
         * @param bottomRight coords. No y coordinate means that it can be stretched.
         * @param useMaxHeight Whether or not the bottomRight coord specifies a max height; in which case the height is variable up to that point.
         */
        initialize: function(topLeft, bottomRight, useMaxHeight)
        {
            this.topLeft = topLeft;
            this.bottomRight = bottomRight;
            this.useMaxHeight = useMaxHeight;
        },
        
        /**
         * Calculates the height.
         * 
         * @return The height.
         */
        height: function()
        {
    	   return this.bottomRight.y - this.topLeft.y;
        },
        
        /**
         * Calculates the width.
         * 
         * @return The width.
         */
        width: function()
        {
        	return this.bottomRight.x - this.topLeft.x;
        }
    });
}